<me:UIPDC  x:Class="WPFExcelReport.TYGRQMPDC"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
     xmlns:me="clr-namespace:WPFExcelReport"  
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIPDC.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIPDC.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=产量日期}}" Height="19"></TextBlock>
            <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" 
                        Text="{Binding DTSTART,ElementName=TV}" VerticalAlignment="Top" Panel.ZIndex="4"
                                SelectedDateChanged ="DTSTART_SelectedDateChanged" Width="125" />
            <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label3" VerticalAlignment="Top" Width="33" FontSize="16" />
            <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Text="{Binding DTEND,ElementName=TV}" 
                        VerticalAlignment="Top" Panel.ZIndex="5"
                                SelectedDateChanged ="DTEND_SelectedDateChanged" Width="122" />
            <Button  Margin="10,0,0,0"  Width="35" Height="31" Name="btnSum"  Click="btnSum_Click" Panel.ZIndex="6">
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                </Button.Background>
            </Button>
            <Button FontSize="18" Height="31" Width="38" Margin="10,0,0,0" Name="btnExport"  Click="btnExport_Click" Panel.ZIndex="7">
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Print.png" />
                </Button.Background>
            </Button>
        </WrapPanel>
        <DataGrid Grid.Row="1"
                    VerticalAlignment="Top"  
                    AutoGenerateColumns="False"
                    EnableRowVirtualization="False"
                    VerticalScrollBarVisibility="Auto"
                    HorizontalScrollBarVisibility="Auto"
                    HeadersVisibility="Column"                 
                    HorizontalAlignment="Stretch"   
                    Name="dlgMaster"
                    ItemsSource="{Binding Source={StaticResource vwMaster}}" RowDetailsVisibilityMode="Visible" 
                    >
            <DataGrid.Columns>
                <!--YARN	QTY	COUNT-->
                <DataGridTextColumn Binding="{Binding Path=YARN}" Header="{Binding Source={Localization:Translate Word=纱型纱支}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=QTY}" Header="{Binding Source={Localization:Translate Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=COUNT}" Header="{Binding Source={Localization:Translate Word=实际支数}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIPDC>
